/*
 * @Description: 首页接口
 * @Author: XuYang 
 * @Date: 2019-06-09 12:45:51 
 * @Last Modified by: XuYang
 * @Last Modified time: 2019-06-13 23:07:54
 */

import { AjaxServer } from './index';

/**
 * 获取验证码
 * @param {object} params 参数
 */
export async function getCoinApi(token) {
  return AjaxServer('get', '/v1/coin/in',token);
}
/**
 * 获取NSS资产
 */
export async function getNssAccountApi(token){
  return AjaxServer('get','/v1/account/nss',token)
}
/**
 * 提币
 * @param {*} token 
 * @param {*} params 
 */
export async function takeMoneyApi(token,params){
  return AjaxServer('put','/v1/coin/out',token, {}, params)
}
/**
 * 充币记录
 * @param {*} token 
 */
export async function chargeCoinRecordApi(token,params){
  return AjaxServer('get','/v1/coin/in_log',token,params)
}
/**
 * 提币记录
 * @param {*} token 
 */
export async function getCoinRecordApi(token,params){
  return AjaxServer('get','/v1/coin/out_log',token,params)
}
/**
 * 提币预请求
 * @param {*} token 
 */
export async function getPreOutApi(token) {
  return AjaxServer('get','/v1/coin/pre_out',token) 
}
/**
 * 通告
 * @param {*} token 
 */
export async function getNoticeApi(token){
  return AjaxServer('get','/v1/home/notice',token) 
}